Carbon


FlattenCollectionToHdl

Header: Collections.h Carbon status: Supported

Flattens a collection into a Macintosh Memory Manager handle.

OSErr FlattenCollectionToHdl (
    Collection aCollection, 
    Handle flattened
);
aCollection

The collection that you want to flatten into a handle. The behavior of this function is undefined if you do not provide a reference to a valid collection object.

flattened

A handle to contain the flattened data. You must provide a valid Macintosh Memory Manager handle in this parameter. You may specify a handle of size 0; this function resizes the handle as necessary to hold the flattened data.

function result

A result code.

DISCUSSION

This function flattens the collection referenced by the aCollection parameter into a block of memory referenced by the handle you provide in the flattened parameter.

To flatten a collection directly to disk, use the FlattenCollection function.

To unflatten a collection from a block of memory referenced by a handle, use the UnflattenCollectionFromHdl function.

AVAILABILITY

Supported in Carbon. Available in Mac OS 8.1 and later when Carbon 1.0.2 or later is present.


© 2000 Apple Computer, Inc. — (Last Updated 5/8/2000)